3.48 \(\int \frac{\sin ^4(e+f x)}{(a+b \sec ^2(e+f x))^2} \, dx\)

Optimal. Leaf size=191 \[ \frac{3 x \left (a^2+8 a b+8 b^2\right )}{8 a^4}-\frac{3 \sqrt{b} \sqrt{a+b} (a+2 b) \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a+b}}\right )}{2 a^4 f}-\frac{3 b (3 a+4 b) \tan (e+f x)}{8 a^3 f \left (a+b \tan ^2(e+f x)+b\right )}-\frac{(5 a+6 b) \sin (e+f x) \cos (e+f x)}{8 a^2 f \left (a+b \tan ^2(e+f x)+b\right )}+\frac{\sin (e+f x) \cos ^3(e+f x)}{4 a f \left (a+b \tan ^2(e+f x)+b\right )} \]

[Out]

(3*(a^2 + 8*a*b + 8*b^2)*x)/(8*a^4) - (3*Sqrt[b]*Sqrt[a + b]*(a + 2*b)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a +
b]])/(2*a^4*f) - ((5*a + 6*b)*Cos[e + f*x]*Sin[e + f*x])/(8*a^2*f*(a + b + b*Tan[e + f*x]^2)) + (Cos[e + f*x]^
3*Sin[e + f*x])/(4*a*f*(a + b + b*Tan[e + f*x]^2)) - (3*b*(3*a + 4*b)*Tan[e + f*x])/(8*a^3*f*(a + b + b*Tan[e
+ f*x]^2))

________________________________________________________________________________________

Rubi [A]  time = 0.255016, antiderivative size = 191, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.261, Rules used = {4132, 470, 527, 522, 203, 205} \[ \frac{3 x \left (a^2+8 a b+8 b^2\right )}{8 a^4}-\frac{3 \sqrt{b} \sqrt{a+b} (a+2 b) \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a+b}}\right )}{2 a^4 f}-\frac{3 b (3 a+4 b) \tan (e+f x)}{8 a^3 f \left (a+b \tan ^2(e+f x)+b\right )}-\frac{(5 a+6 b) \sin (e+f x) \cos (e+f x)}{8 a^2 f \left (a+b \tan ^2(e+f x)+b\right )}+\frac{\sin (e+f x) \cos ^3(e+f x)}{4 a f \left (a+b \tan ^2(e+f x)+b\right )} \]

Antiderivative was successfully verified.

[In]

Int[Sin[e + f*x]^4/(a + b*Sec[e + f*x]^2)^2,x]

[Out]

(3*(a^2 + 8*a*b + 8*b^2)*x)/(8*a^4) - (3*Sqrt[b]*Sqrt[a + b]*(a + 2*b)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a +
b]])/(2*a^4*f) - ((5*a + 6*b)*Cos[e + f*x]*Sin[e + f*x])/(8*a^2*f*(a + b + b*Tan[e + f*x]^2)) + (Cos[e + f*x]^
3*Sin[e + f*x])/(4*a*f*(a + b + b*Tan[e + f*x]^2)) - (3*b*(3*a + 4*b)*Tan[e + f*x])/(8*a^3*f*(a + b + b*Tan[e
+ f*x]^2))

Rule 4132

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_)]^(m_), x_Symbol] :> With[{ff = Fr
eeFactors[Tan[e + f*x], x]}, Dist[ff^(m + 1)/f, Subst[Int[(x^m*ExpandToSum[a + b*(1 + ff^2*x^2)^(n/2), x]^p)/(
1 + ff^2*x^2)^(m/2 + 1), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[m/2] && Integer
Q[n/2]

Rule 470

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> -Simp[(a*e^(2
*n - 1)*(e*x)^(m - 2*n + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(b*n*(b*c - a*d)*(p + 1)), x] + Dist[e^(2
*n)/(b*n*(b*c - a*d)*(p + 1)), Int[(e*x)^(m - 2*n)*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[a*c*(m - 2*n + 1) +
(a*d*(m - n + n*q + 1) + b*c*n*(p + 1))*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, q}, x] && NeQ[b*c - a*d, 0] &
& IGtQ[n, 0] && LtQ[p, -1] && GtQ[m - n + 1, n] && IntBinomialQ[a, b, c, d, e, m, n, p, q, x]

Rule 527

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)), x_Symbol] :> -Simp[
((b*e - a*f)*x*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(a*n*(b*c - a*d)*(p + 1)), x] + Dist[1/(a*n*(b*c - a*d
)*(p + 1)), Int[(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*(b*e - a*f) + e*n*(b*c - a*d)*(p + 1) + d*(b*e - a*f)
*(n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, n, q}, x] && LtQ[p, -1]

Rule 522

Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[(b*e - a*f
)/(b*c - a*d), Int[1/(a + b*x^n), x], x] - Dist[(d*e - c*f)/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a
, b, c, d, e, f, n}, x]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{\sin ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{x^4}{\left (1+x^2\right )^3 \left (a+b+b x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{\cos ^3(e+f x) \sin (e+f x)}{4 a f \left (a+b+b \tan ^2(e+f x)\right )}-\frac{\operatorname{Subst}\left (\int \frac{a+b+(-4 a-5 b) x^2}{\left (1+x^2\right )^2 \left (a+b+b x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{4 a f}\\ &=-\frac{(5 a+6 b) \cos (e+f x) \sin (e+f x)}{8 a^2 f \left (a+b+b \tan ^2(e+f x)\right )}+\frac{\cos ^3(e+f x) \sin (e+f x)}{4 a f \left (a+b+b \tan ^2(e+f x)\right )}+\frac{\operatorname{Subst}\left (\int \frac{3 (a+b) (a+2 b)-3 b (5 a+6 b) x^2}{\left (1+x^2\right ) \left (a+b+b x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{8 a^2 f}\\ &=-\frac{(5 a+6 b) \cos (e+f x) \sin (e+f x)}{8 a^2 f \left (a+b+b \tan ^2(e+f x)\right )}+\frac{\cos ^3(e+f x) \sin (e+f x)}{4 a f \left (a+b+b \tan ^2(e+f x)\right )}-\frac{3 b (3 a+4 b) \tan (e+f x)}{8 a^3 f \left (a+b+b \tan ^2(e+f x)\right )}+\frac{\operatorname{Subst}\left (\int \frac{6 (a+b)^2 (a+4 b)-6 b (a+b) (3 a+4 b) x^2}{\left (1+x^2\right ) \left (a+b+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{16 a^3 (a+b) f}\\ &=-\frac{(5 a+6 b) \cos (e+f x) \sin (e+f x)}{8 a^2 f \left (a+b+b \tan ^2(e+f x)\right )}+\frac{\cos ^3(e+f x) \sin (e+f x)}{4 a f \left (a+b+b \tan ^2(e+f x)\right )}-\frac{3 b (3 a+4 b) \tan (e+f x)}{8 a^3 f \left (a+b+b \tan ^2(e+f x)\right )}-\frac{(3 b (a+b) (a+2 b)) \operatorname{Subst}\left (\int \frac{1}{a+b+b x^2} \, dx,x,\tan (e+f x)\right )}{2 a^4 f}+\frac{\left (3 \left (a^2+8 a b+8 b^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{8 a^4 f}\\ &=\frac{3 \left (a^2+8 a b+8 b^2\right ) x}{8 a^4}-\frac{3 \sqrt{b} \sqrt{a+b} (a+2 b) \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a+b}}\right )}{2 a^4 f}-\frac{(5 a+6 b) \cos (e+f x) \sin (e+f x)}{8 a^2 f \left (a+b+b \tan ^2(e+f x)\right )}+\frac{\cos ^3(e+f x) \sin (e+f x)}{4 a f \left (a+b+b \tan ^2(e+f x)\right )}-\frac{3 b (3 a+4 b) \tan (e+f x)}{8 a^3 f \left (a+b+b \tan ^2(e+f x)\right )}\\ \end{align*}

Mathematica [C]  time = 14.2768, size = 1105, normalized size = 5.79 \[ -\frac{(\cos (2 e+2 f x) a+a+2 b)^2 \left (16 x+\frac{\left (-a^3+6 b a^2+24 b^2 a+16 b^3\right ) \tan ^{-1}\left (\frac{\sec (f x) (\cos (2 e)-i \sin (2 e)) (a \sin (2 e+f x)-(a+2 b) \sin (f x))}{2 \sqrt{a+b} \sqrt{b (\cos (e)-i \sin (e))^4}}\right ) (\cos (2 e)-i \sin (2 e))}{b (a+b)^{3/2} f \sqrt{b (\cos (e)-i \sin (e))^4}}+\frac{\left (a^2+8 b a+8 b^2\right ) ((a+2 b) \sin (2 e)-a \sin (2 f x))}{b (a+b) f (\cos (2 (e+f x)) a+a+2 b) (\cos (e)-\sin (e)) (\cos (e)+\sin (e))}\right ) \sec ^4(e+f x)}{256 a^2 \left (b \sec ^2(e+f x)+a\right )^2}+\frac{3 (\cos (2 e+2 f x) a+a+2 b)^2 \left (\frac{(a+2 b) \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a+b}}\right )}{(a+b)^{3/2}}-\frac{a \sqrt{b} \sin (2 (e+f x))}{(a+b) (\cos (2 (e+f x)) a+a+2 b)}\right ) \sec ^4(e+f x)}{1024 b^{3/2} f \left (b \sec ^2(e+f x)+a\right )^2}+\frac{(\cos (2 e+2 f x) a+a+2 b)^2 \left (\frac{\sec (2 e) \left (\sin (2 e) a^5-\sin (2 f x) a^5+80 b f x \cos (4 e+2 f x) a^4+34 b \sin (2 e) a^4-62 b \sin (2 f x) a^4-12 b \sin (2 (e+2 f x)) a^4-30 b \sin (4 e+2 f x) a^4-12 b \sin (6 e+4 f x) a^4+2 b \sin (4 e+6 f x) a^4+2 b \sin (8 e+6 f x) a^4+464 b^2 f x \cos (4 e+2 f x) a^3+224 b^2 \sin (2 e) a^3-318 b^2 \sin (2 f x) a^3-36 b^2 \sin (2 (e+2 f x)) a^3-158 b^2 \sin (4 e+2 f x) a^3-36 b^2 \sin (6 e+4 f x) a^3+2 b^2 \sin (4 e+6 f x) a^3+2 b^2 \sin (8 e+6 f x) a^3+768 b^3 f x \cos (4 e+2 f x) a^2+576 b^3 \sin (2 e) a^2-512 b^3 \sin (2 f x) a^2-24 b^3 \sin (2 (e+2 f x)) a^2-256 b^3 \sin (4 e+2 f x) a^2-24 b^3 \sin (6 e+4 f x) a^2+16 b \left (5 a^3+29 b a^2+48 b^2 a+24 b^3\right ) f x \cos (2 f x) a+384 b^4 f x \cos (4 e+2 f x) a+640 b^4 \sin (2 e) a-256 b^4 \sin (2 f x) a-128 b^4 \sin (4 e+2 f x) a+32 b \left (5 a^4+39 b a^3+106 b^2 a^2+120 b^3 a+48 b^4\right ) f x \cos (2 e)+256 b^5 \sin (2 e)\right )}{\cos (2 (e+f x)) a+a+2 b}-\frac{\left (a^5-30 b a^4-480 b^2 a^3-1600 b^3 a^2-1920 b^4 a-768 b^5\right ) \tan ^{-1}\left (\frac{\sec (f x) (\cos (2 e)-i \sin (2 e)) (a \sin (2 e+f x)-(a+2 b) \sin (f x))}{2 \sqrt{a+b} \sqrt{b (\cos (e)-i \sin (e))^4}}\right ) (\cos (2 e)-i \sin (2 e))}{\sqrt{a+b} \sqrt{b (\cos (e)-i \sin (e))^4}}\right ) \sec ^4(e+f x)}{1024 a^4 b (a+b) f \left (b \sec ^2(e+f x)+a\right )^2} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[Sin[e + f*x]^4/(a + b*Sec[e + f*x]^2)^2,x]

[Out]

-((a + 2*b + a*Cos[2*e + 2*f*x])^2*Sec[e + f*x]^4*(16*x + ((-a^3 + 6*a^2*b + 24*a*b^2 + 16*b^3)*ArcTan[(Sec[f*
x]*(Cos[2*e] - I*Sin[2*e])*(-((a + 2*b)*Sin[f*x]) + a*Sin[2*e + f*x]))/(2*Sqrt[a + b]*Sqrt[b*(Cos[e] - I*Sin[e
])^4])]*(Cos[2*e] - I*Sin[2*e]))/(b*(a + b)^(3/2)*f*Sqrt[b*(Cos[e] - I*Sin[e])^4]) + ((a^2 + 8*a*b + 8*b^2)*((
a + 2*b)*Sin[2*e] - a*Sin[2*f*x]))/(b*(a + b)*f*(a + 2*b + a*Cos[2*(e + f*x)])*(Cos[e] - Sin[e])*(Cos[e] + Sin
[e]))))/(256*a^2*(a + b*Sec[e + f*x]^2)^2) + (3*(a + 2*b + a*Cos[2*e + 2*f*x])^2*Sec[e + f*x]^4*(((a + 2*b)*Ar
cTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a + b]])/(a + b)^(3/2) - (a*Sqrt[b]*Sin[2*(e + f*x)])/((a + b)*(a + 2*b + a*C
os[2*(e + f*x)]))))/(1024*b^(3/2)*f*(a + b*Sec[e + f*x]^2)^2) + ((a + 2*b + a*Cos[2*e + 2*f*x])^2*Sec[e + f*x]
^4*(-(((a^5 - 30*a^4*b - 480*a^3*b^2 - 1600*a^2*b^3 - 1920*a*b^4 - 768*b^5)*ArcTan[(Sec[f*x]*(Cos[2*e] - I*Sin
[2*e])*(-((a + 2*b)*Sin[f*x]) + a*Sin[2*e + f*x]))/(2*Sqrt[a + b]*Sqrt[b*(Cos[e] - I*Sin[e])^4])]*(Cos[2*e] -
I*Sin[2*e]))/(Sqrt[a + b]*Sqrt[b*(Cos[e] - I*Sin[e])^4])) + (Sec[2*e]*(32*b*(5*a^4 + 39*a^3*b + 106*a^2*b^2 +
120*a*b^3 + 48*b^4)*f*x*Cos[2*e] + 16*a*b*(5*a^3 + 29*a^2*b + 48*a*b^2 + 24*b^3)*f*x*Cos[2*f*x] + 80*a^4*b*f*x
*Cos[4*e + 2*f*x] + 464*a^3*b^2*f*x*Cos[4*e + 2*f*x] + 768*a^2*b^3*f*x*Cos[4*e + 2*f*x] + 384*a*b^4*f*x*Cos[4*
e + 2*f*x] + a^5*Sin[2*e] + 34*a^4*b*Sin[2*e] + 224*a^3*b^2*Sin[2*e] + 576*a^2*b^3*Sin[2*e] + 640*a*b^4*Sin[2*
e] + 256*b^5*Sin[2*e] - a^5*Sin[2*f*x] - 62*a^4*b*Sin[2*f*x] - 318*a^3*b^2*Sin[2*f*x] - 512*a^2*b^3*Sin[2*f*x]
 - 256*a*b^4*Sin[2*f*x] - 12*a^4*b*Sin[2*(e + 2*f*x)] - 36*a^3*b^2*Sin[2*(e + 2*f*x)] - 24*a^2*b^3*Sin[2*(e +
2*f*x)] - 30*a^4*b*Sin[4*e + 2*f*x] - 158*a^3*b^2*Sin[4*e + 2*f*x] - 256*a^2*b^3*Sin[4*e + 2*f*x] - 128*a*b^4*
Sin[4*e + 2*f*x] - 12*a^4*b*Sin[6*e + 4*f*x] - 36*a^3*b^2*Sin[6*e + 4*f*x] - 24*a^2*b^3*Sin[6*e + 4*f*x] + 2*a
^4*b*Sin[4*e + 6*f*x] + 2*a^3*b^2*Sin[4*e + 6*f*x] + 2*a^4*b*Sin[8*e + 6*f*x] + 2*a^3*b^2*Sin[8*e + 6*f*x]))/(
a + 2*b + a*Cos[2*(e + f*x)])))/(1024*a^4*b*(a + b)*f*(a + b*Sec[e + f*x]^2)^2)

________________________________________________________________________________________

Maple [A]  time = 0.102, size = 323, normalized size = 1.7 \begin{align*} -{\frac{ \left ( \tan \left ( fx+e \right ) \right ) ^{3}b}{f{a}^{3} \left ( \left ( \tan \left ( fx+e \right ) \right ) ^{2}+1 \right ) ^{2}}}-{\frac{5\, \left ( \tan \left ( fx+e \right ) \right ) ^{3}}{8\,f{a}^{2} \left ( \left ( \tan \left ( fx+e \right ) \right ) ^{2}+1 \right ) ^{2}}}-{\frac{3\,\tan \left ( fx+e \right ) }{8\,f{a}^{2} \left ( \left ( \tan \left ( fx+e \right ) \right ) ^{2}+1 \right ) ^{2}}}-{\frac{\tan \left ( fx+e \right ) b}{f{a}^{3} \left ( \left ( \tan \left ( fx+e \right ) \right ) ^{2}+1 \right ) ^{2}}}+3\,{\frac{\arctan \left ( \tan \left ( fx+e \right ) \right ) b}{f{a}^{3}}}+3\,{\frac{\arctan \left ( \tan \left ( fx+e \right ) \right ){b}^{2}}{f{a}^{4}}}+{\frac{3\,\arctan \left ( \tan \left ( fx+e \right ) \right ) }{8\,f{a}^{2}}}-{\frac{\tan \left ( fx+e \right ) b}{2\,f{a}^{2} \left ( a+b+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) }}-{\frac{3\,b}{2\,f{a}^{2}}\arctan \left ({\tan \left ( fx+e \right ) b{\frac{1}{\sqrt{ \left ( a+b \right ) b}}}} \right ){\frac{1}{\sqrt{ \left ( a+b \right ) b}}}}-{\frac{9\,{b}^{2}}{2\,f{a}^{3}}\arctan \left ({\tan \left ( fx+e \right ) b{\frac{1}{\sqrt{ \left ( a+b \right ) b}}}} \right ){\frac{1}{\sqrt{ \left ( a+b \right ) b}}}}-{\frac{{b}^{2}\tan \left ( fx+e \right ) }{2\,f{a}^{3} \left ( a+b+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) }}-3\,{\frac{{b}^{3}}{f{a}^{4}\sqrt{ \left ( a+b \right ) b}}\arctan \left ({\frac{\tan \left ( fx+e \right ) b}{\sqrt{ \left ( a+b \right ) b}}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(f*x+e)^4/(a+b*sec(f*x+e)^2)^2,x)

[Out]

-1/f/a^3/(tan(f*x+e)^2+1)^2*tan(f*x+e)^3*b-5/8/f/a^2/(tan(f*x+e)^2+1)^2*tan(f*x+e)^3-3/8/f/a^2/(tan(f*x+e)^2+1
)^2*tan(f*x+e)-1/f/a^3/(tan(f*x+e)^2+1)^2*tan(f*x+e)*b+3/f/a^3*arctan(tan(f*x+e))*b+3/f/a^4*arctan(tan(f*x+e))
*b^2+3/8/f/a^2*arctan(tan(f*x+e))-1/2*b*tan(f*x+e)/a^2/f/(a+b+b*tan(f*x+e)^2)-3/2/f*b/a^2/((a+b)*b)^(1/2)*arct
an(tan(f*x+e)*b/((a+b)*b)^(1/2))-9/2/f*b^2/a^3/((a+b)*b)^(1/2)*arctan(tan(f*x+e)*b/((a+b)*b)^(1/2))-1/2/f*b^2/
a^3*tan(f*x+e)/(a+b+b*tan(f*x+e)^2)-3/f*b^3/a^4/((a+b)*b)^(1/2)*arctan(tan(f*x+e)*b/((a+b)*b)^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)^4/(a+b*sec(f*x+e)^2)^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 0.664461, size = 1211, normalized size = 6.34 \begin{align*} \left [\frac{3 \,{\left (a^{3} + 8 \, a^{2} b + 8 \, a b^{2}\right )} f x \cos \left (f x + e\right )^{2} + 3 \,{\left (a^{2} b + 8 \, a b^{2} + 8 \, b^{3}\right )} f x + 3 \,{\left ({\left (a^{2} + 2 \, a b\right )} \cos \left (f x + e\right )^{2} + a b + 2 \, b^{2}\right )} \sqrt{-a b - b^{2}} \log \left (\frac{{\left (a^{2} + 8 \, a b + 8 \, b^{2}\right )} \cos \left (f x + e\right )^{4} - 2 \,{\left (3 \, a b + 4 \, b^{2}\right )} \cos \left (f x + e\right )^{2} + 4 \,{\left ({\left (a + 2 \, b\right )} \cos \left (f x + e\right )^{3} - b \cos \left (f x + e\right )\right )} \sqrt{-a b - b^{2}} \sin \left (f x + e\right ) + b^{2}}{a^{2} \cos \left (f x + e\right )^{4} + 2 \, a b \cos \left (f x + e\right )^{2} + b^{2}}\right ) +{\left (2 \, a^{3} \cos \left (f x + e\right )^{5} -{\left (5 \, a^{3} + 6 \, a^{2} b\right )} \cos \left (f x + e\right )^{3} - 3 \,{\left (3 \, a^{2} b + 4 \, a b^{2}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{8 \,{\left (a^{5} f \cos \left (f x + e\right )^{2} + a^{4} b f\right )}}, \frac{3 \,{\left (a^{3} + 8 \, a^{2} b + 8 \, a b^{2}\right )} f x \cos \left (f x + e\right )^{2} + 3 \,{\left (a^{2} b + 8 \, a b^{2} + 8 \, b^{3}\right )} f x + 6 \,{\left ({\left (a^{2} + 2 \, a b\right )} \cos \left (f x + e\right )^{2} + a b + 2 \, b^{2}\right )} \sqrt{a b + b^{2}} \arctan \left (\frac{{\left (a + 2 \, b\right )} \cos \left (f x + e\right )^{2} - b}{2 \, \sqrt{a b + b^{2}} \cos \left (f x + e\right ) \sin \left (f x + e\right )}\right ) +{\left (2 \, a^{3} \cos \left (f x + e\right )^{5} -{\left (5 \, a^{3} + 6 \, a^{2} b\right )} \cos \left (f x + e\right )^{3} - 3 \,{\left (3 \, a^{2} b + 4 \, a b^{2}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{8 \,{\left (a^{5} f \cos \left (f x + e\right )^{2} + a^{4} b f\right )}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)^4/(a+b*sec(f*x+e)^2)^2,x, algorithm="fricas")

[Out]

[1/8*(3*(a^3 + 8*a^2*b + 8*a*b^2)*f*x*cos(f*x + e)^2 + 3*(a^2*b + 8*a*b^2 + 8*b^3)*f*x + 3*((a^2 + 2*a*b)*cos(
f*x + e)^2 + a*b + 2*b^2)*sqrt(-a*b - b^2)*log(((a^2 + 8*a*b + 8*b^2)*cos(f*x + e)^4 - 2*(3*a*b + 4*b^2)*cos(f
*x + e)^2 + 4*((a + 2*b)*cos(f*x + e)^3 - b*cos(f*x + e))*sqrt(-a*b - b^2)*sin(f*x + e) + b^2)/(a^2*cos(f*x +
e)^4 + 2*a*b*cos(f*x + e)^2 + b^2)) + (2*a^3*cos(f*x + e)^5 - (5*a^3 + 6*a^2*b)*cos(f*x + e)^3 - 3*(3*a^2*b +
4*a*b^2)*cos(f*x + e))*sin(f*x + e))/(a^5*f*cos(f*x + e)^2 + a^4*b*f), 1/8*(3*(a^3 + 8*a^2*b + 8*a*b^2)*f*x*co
s(f*x + e)^2 + 3*(a^2*b + 8*a*b^2 + 8*b^3)*f*x + 6*((a^2 + 2*a*b)*cos(f*x + e)^2 + a*b + 2*b^2)*sqrt(a*b + b^2
)*arctan(1/2*((a + 2*b)*cos(f*x + e)^2 - b)/(sqrt(a*b + b^2)*cos(f*x + e)*sin(f*x + e))) + (2*a^3*cos(f*x + e)
^5 - (5*a^3 + 6*a^2*b)*cos(f*x + e)^3 - 3*(3*a^2*b + 4*a*b^2)*cos(f*x + e))*sin(f*x + e))/(a^5*f*cos(f*x + e)^
2 + a^4*b*f)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)**4/(a+b*sec(f*x+e)**2)**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.25044, size = 275, normalized size = 1.44 \begin{align*} \frac{\frac{3 \,{\left (a^{2} + 8 \, a b + 8 \, b^{2}\right )}{\left (f x + e\right )}}{a^{4}} - \frac{12 \,{\left (a^{2} b + 3 \, a b^{2} + 2 \, b^{3}\right )}{\left (\pi \left \lfloor \frac{f x + e}{\pi } + \frac{1}{2} \right \rfloor \mathrm{sgn}\left (b\right ) + \arctan \left (\frac{b \tan \left (f x + e\right )}{\sqrt{a b + b^{2}}}\right )\right )}}{\sqrt{a b + b^{2}} a^{4}} - \frac{4 \,{\left (a b \tan \left (f x + e\right ) + b^{2} \tan \left (f x + e\right )\right )}}{{\left (b \tan \left (f x + e\right )^{2} + a + b\right )} a^{3}} - \frac{5 \, a \tan \left (f x + e\right )^{3} + 8 \, b \tan \left (f x + e\right )^{3} + 3 \, a \tan \left (f x + e\right ) + 8 \, b \tan \left (f x + e\right )}{{\left (\tan \left (f x + e\right )^{2} + 1\right )}^{2} a^{3}}}{8 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)^4/(a+b*sec(f*x+e)^2)^2,x, algorithm="giac")

[Out]

1/8*(3*(a^2 + 8*a*b + 8*b^2)*(f*x + e)/a^4 - 12*(a^2*b + 3*a*b^2 + 2*b^3)*(pi*floor((f*x + e)/pi + 1/2)*sgn(b)
 + arctan(b*tan(f*x + e)/sqrt(a*b + b^2)))/(sqrt(a*b + b^2)*a^4) - 4*(a*b*tan(f*x + e) + b^2*tan(f*x + e))/((b
*tan(f*x + e)^2 + a + b)*a^3) - (5*a*tan(f*x + e)^3 + 8*b*tan(f*x + e)^3 + 3*a*tan(f*x + e) + 8*b*tan(f*x + e)
)/((tan(f*x + e)^2 + 1)^2*a^3))/f